package com.mail.portal.modular.controller;

import com.mail.portal.common.controller.BaseController;
import com.mail.portal.modular.model.ProductCategory;
import com.mail.portal.modular.service.IProductCategoryService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * 创建人： Shi Heng
 * 创建时间：2018-04-22 10:44
 * QQ：374696376
 * Description：关于我们控制器
 */


@Controller
@RequestMapping("/jhcb/aboutus")
public class AboutusController extends BaseController {

    @Resource
    private IProductCategoryService productCategoryService;

    @RequestMapping("/aboutus.html")
    public String newsList(Model model) {

        List<ProductCategory> categories = productCategoryService.selectAll();
        model.addAttribute("categories", categories);

        return "/aboutus.html";
    }
}
